package com.talkingdata.hadoop.guard.mapper;

import com.talkingdata.hadoop.guard.bean.DataNodeState;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface DataNodeMapper {
    @Insert("insert into data_node_state (service_id,hostname," +
            "last_contact,num_blocks,block_pool_used_percent,admin_state," +
            "capacity,volfails,failed_storage_ids,last_volume_failure_date,timestamp) values (#{serviceId},#{hostname},#{lastContact}," +
            "#{numBlocks},#{blockPoolUsedPercent},#{adminState}," +
            "#{capacity},#{volfails},#{failedStorageIds},#{lastVolumeFailureDate},#{timestamp})")
    int insertDataNode (DataNodeState dataNodeState);
}
